package com.immoc.wkcto.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;

import javax.annotation.Resource;


@EnableWebSecurity //表示启用spring security安全框架的功能。
public class MySecurityConfigTwo extends WebSecurityConfigurerAdapter {

    @Resource
    private UserDetailsService jdbcUserDetailsService;

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        super.configure(http);
        http.userDetailsService(jdbcUserDetailsService);
    }
}
